﻿using System;
using System.Data;

public partial class manager_taskfinish_Default : System.Web.UI.Page
{
    DBHelper db = new DBHelper();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            bindData();
        }
    }
    private void bindData()
    {
        string zx_psid = Session[AppConfig.SESSION_USER_PSID].ToString();


        DataTable dt = db.getList("select top 100 * from v_A_Task where state=4 and zx_psid='" + zx_psid + "'  order by id desc");
        rpt_Listask1.DataSource = dt;
        rpt_Listask1.DataBind();


    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string zx_psid = Session[AppConfig.SESSION_USER_PSID].ToString();
        string str_where = "";
        string Year = ddl_year.SelectedValue;
        string Month = ddl_month.SelectedValue;
        if (Year != "全部")
        {
            str_where += " and [Year]='" + Year + "'";
        }
        if (Month != "全部")
        {
            str_where += " and [Month]='" + Month + "'";
        }

        DataTable dt = db.getList("select top 100 * from v_A_Task where state=4 and zx_psid='" + zx_psid + "'" + str_where + "  order by id desc");

        rpt_Listask1.DataSource = dt;
        rpt_Listask1.DataBind();
    }
}